Repository navigation
fix(web): 修复系统设置首次进入时目录误打开的初始化问题 - #797
Merged
Merged
Conversation
LIghtJUNction
marked this pull request as ready for review
October 11, 2026 15:20
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当前本地复核
当前签名 head
94403031ac12e0c66cda7eb6590ce13059f28cc0。只补测试夹具:固定路由参数类型、恢复 global scrollTo、在锁定 Happy DOM 中同步观察实际 DOM 写入,保持原产品修复和全部断言。没有伪造组件打开状态。Bun 1.3.14:新增导航 5/5、既有 scrubber 5/5、typecheck、lint、build、bundle 检查通过。相同测试恢复旧产品代码后恰好桌面侧栏展开、手机菜单打开两个首入场景失败,修复后通过;独立复核通过。构建产生的生成路由顺序变化另有独立小 PR,不在这里混入。
本次只验证首入多余打开请求已消除。完整 React 19/Base UI 1.8 页面中的点击锁死、焦点、遮罩与手机主题流程仍需实际浏览器验收;不声称原用户整站症状已经治愈。本地证据
~/.local/state/lmm-api/pr-merge-review-20261011/new-prs/797/。无 CI dispatch、生产访问、发布或部署。此前说明与历史验证
LMM API Pull Request
变更说明 / Summary
针对用户反馈:首次进入「系统设置 → 站点与品牌 → 系统信息」后点击没有效果,刷新后恢复。
基线:
main@648c58b0362a9261015096c1753e39cb64a693bc。提交:f2be6436e650009a04f5bdaecb23ebdff847db60。已确认的初始化缺陷:
AuthenticatedLayout在站内导航时保留同一个SidebarProvider。变更defaultOpen不会重置已存在的侧栏状态。FloatingSettingsNavigation首次渲染直接把桌面open/ 手机openMobile传给Sheet,随后才在 effect 中关闭。因此,从已展开的侧栏进入时会出现没有用户操作的open=true → false;直接刷新则从关闭状态开始。inert/pointer-events,不重置整个布局,不改动设置保存或后端权限。仅两个文件:导航组件的最小修改,以及采用实际 Router / SidebarProvider / Sheet 的回归测试。新增测试检查首次进入期间的打开请求和遮罩插入,而非只检查最后已经关闭的画面;同时覆盖打开、关闭、表单聚焦、切换章节、离开及再次进入。
验收边界:已复现并修正多余的初始打开请求,尚未在项目锁定版本的 Base UI 和完整页面中复现用户报告的点击锁死。此 PR 保留 Draft,不将隔离测试当作整站或线上修复验收。
与上游的关系 / Upstream relationship
上游参考:项目独有的设置悬浮目录,无外部上游变更。
关联 Issue / Related issue
来自本次用户截图报告。已搜索打开的 Issues / PRs 的 settings、设置和系统信息关键词,未找到同一目录首次进入问题;不关闭其他设置入口问题。
变更类型 / Type of change
验证 / Verification
实际执行的本地检查:
隔离浏览器检查的范围:执行完整导航组件与实际
settings-scrubber.ts,使用本机 Chromium 和缓存的 React 18.2;Router、Sidebar 上下文、Sheet、基础 UI 和搜索目录为测试替身。该检查证明组件发出的初始打开状态和上述组件操作,不证明 Base UI 1.8 的焦点锁清理、实际 React 19 应用、真实页面布局或线上行为。基线在此测试替身中也能正常点击,因此不把它描述为线上点击锁死的复现。读取的完整基线源码已核对 Git blob:
eccabdde6bbaf1fa277156dc9e4006aadff45c12ad8748e32313136ac6e64843517f0d60fe77db82未执行:仓库锁定依赖的新增测试、现有拖动测试、项目 typecheck / lint / build、真实完整页面浏览器验收。当前执行环境没有 Bun 或项目依赖,容器无法解析外网地址,无法安装。没有修改依赖锁文件,也没有把测试替身写进生产代码。未触发远程 CI、合并、发布或部署。
待在完整本机工作区执行:
另需完整页面验收:桌面侧栏展开/折叠进入、手机菜单进入、刷新直接加载、退出后再次进入;确认无隐藏遮罩截获点击,目录与表单在亮暗主题下均可用。
截图或日志 / Screenshots or logs
以上是隔离组件日志,不是整站截图或实际 Base UI 验收。未访问生产管理账号或生产数据库。
提交检查 / Checklist